<!DOCTYPE html>
<html>
    <head> 
        <script src="<?php echo ThemePath(); ?>/js/jquery-1.9.0.js" type="text/javascript"></script>
        <title><?php echo CHtml::encode($this->pageTitle); ?></title>      
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta charset="utf-8">
        <link href="<?php echo ThemePath(); ?>/css/global.css" rel="stylesheet" type="text/css">
        <link href="<?php echo ThemePath(); ?>/css/custome.css" rel="stylesheet" type="text/css">
        <link href="<?php echo ThemePath(); ?>/css/bootstrap.css" rel="stylesheet" type="text/css" media="screen">
        <link href="<?php echo ThemePath(); ?>/css/bootstrap-responsive.css" rel="stylesheet" type="text/css" />
        <link href="<?php echo ThemePath(); ?>/css/fancyfields.css" rel="stylesheet" type="text/css" />
        <link href="<?php echo ThemePath(); ?>/css/meanmenu.min.css" rel="stylesheet" type="text/css" />
        <link href="<?php echo ThemePath(); ?>/css/bootstrap-timepicker.min.css" rel="stylesheet" type="text/css" /> 
        <link rel="stylesheet" href="<?php echo ThemePath(); ?>/css/colorbox.css" />
        <script src="<?php echo ThemePath(); ?>/js/jquery.colorbox.js" type="text/javascript"></script>   
        <script type="text/javascript" src="<?php echo ThemePath(); ?>/js/jquery.lightbox_me.js"></script>
        <link rel="icon" type="image/x-icon" href="favicon.ico" />
        <script src="<?php echo ThemePath(); ?>/js/jquery.alerts.js" type="text/javascript"></script>
        <link href="<?php echo ThemePath(); ?>/css/jquery.alerts.css" rel="stylesheet" type="text/css" media="screen" />
        <!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
        <!--[if lt IE 9]>		
        <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
        <![endif]-->
        <!--[if IE]>
            <link rel="stylesheet" type="text/css" href="css/ie-only.css" />
        <![endif]-->

        <script>
            function openLoginCheckout(amount){
                $("#checkout_amountlast").val(amount);
                $.magnificPopup.open({
                    items: [{src: '#loginPopCheckout', type: 'inline'} ],
                    gallery: {enabled: true},
                    mainClass: 'mfp-fade',
                    removalDelay: 160,
                    type: 'image'
                });
            }
			
            function openShopCart(){
                $.magnificPopup.open({items: { src: '<?php echo Yii::app()->createAbsoluteUrl("shoppingCart/view"); ?>' }, type: 'ajax',closeOnBgClick: false,closeOnContentClick:false });
            }
				
            function setAuthKey(authKey, action) {
                $.post("<?php echo Yii::app()->createUrl("/classes/setAuthKey"); ?>", {authKey: authKey, action: action}, function(result) {
                    window.location.href = result;
                });
            }
            function imageloding(){
                $.blockUI({ message: '<h5 class="fnt-size15 padding10px"><img style="margin-right:30px;"src="<?php echo ThemePath() . '/images/hippo-loader.gif'; ?>" /></h5>' });  
            } 
			
            function actionEBS(uid,name,email,phon_no,secure_hash,amount){
                $("#user_id").val(uid);
                $("#email").val(email);
                $("#amount").val(amount);
                if(name==""){
                    $("#user_name").val(email);
                    $("#ship_name").val(email);
                }else{
                    $("#user_name").val(name);
                    $("#ship_name").val(name);
                }
                if(phon_no==""){
                    var phon_no = <?php echo Message::EBS_PHONE; ?>;
                    $("#phone").val(phon_no);
                    $("#ship_phone").val(phon_no);
                } else {
                    $("#phone").val(phon_no);
                    $("#ship_phone").val(phon_no);
                }
				
                $("#user_id").val(uid);
                $("#user_email").val(email);
                $("#secure_hashPOP").val(secure_hash);
                $("#frmTransaction").submit();
                var magnificPopup = $.magnificPopup.instance; 
                magnificPopup.close(); 
            }
         

            function openLoginReview(){
                $.magnificPopup.open({
                    items: [{src: '#loginPopReview', type: 'inline'} ],
                    gallery: {enabled: true},
                    mainClass: 'mfp-fade',
                    removalDelay: 160,
                    type: 'image'
                });
            }
         
            function setSessionForTrainer(val){          
                $.post("<?php echo Yii::app()->createUrl("Users/setUserSession"); ?>",
                {sessionVal: val},
                function(resultclass) {
return false;
                });
    } 

 
	
    
        </script>
    </head>
    <body>
        <?php
        $lastClass = '';
        $loginIduserDetails = '';
        $loginIduserDetails = getLoginUserId();
        if (isset($loginIduserDetails) &&(!empty($loginIduserDetails))) {
            $loginIduserDetails = Users::getFrontEndUser($loginIduserDetails);
            $username = !empty($loginIduserDetails->first_name) ? $loginIduserDetails->first_name : $loginIduserDetails->user->username;
            $image = ($loginIduserDetails->photo != '') ? $loginIduserDetails->user_id . '/profile/minithumb/' . $loginIduserDetails->photo : 'default-mini.png';
            $imagesrc = baseUrl() . '../../' . getUploadDir() . $image;
            $lastClass = 'last';
        }
        ?>
        <header id="head">
            <div class="top">
                <div class="container">
                    <div class="row">
                        <div class="span12">                      
                            <div class="col-L">
                                <div class="logo">
                                    <a href="<?php echo $this->createAbsoluteUrl('/site/index'); ?>"><img src="<?php echo ThemePath(); ?>/images/logo.png" /></a>
                                </div>
                            </div>

                            <div class="col-C">
                                <div class="searchForm">
                                    <form action="#">
                                        <fieldset>                            
                                            <input type="text" class="search-terms"  value="Enter Keyword(s)"> <span>|</span>                         
                                            <p class="selectBox">
                                                <select class="fancySelectBox">
                                                    <option>All</option>
                                                    <option>All</option>
                                                    <option>All</option>
                                                    <option>All</option>
                                                </select>
                                            </p>
                                            <input type="submit" class="btn-go" value="Go">
                                        </fieldset>                         
                                    </form>
                                </div>
                            </div>

                            <div class="col-R">
                                <div class="shoppingCart">
                                    <p class="cartlabel"><?php echo CHtml::link('<em class="sprite">&nbsp;</em>', '#', array('onclick' => 'return openShopCart();')); ?><?php echo count(Yii::app()->shoppingCart->getPositions()); ?> Items</p>
                                </div>
                            </div>                
                            <div class="clear"></div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="bottom">
                <div class="container">
                    <div class="row">            
                        <div class="span12">
                            <!--User Profile Drop Down For PC /*Add loggeduser Class*/-->
                            <?php
                            $this->widget('zii.widgets.CMenu', array(
                                'id' => 'userMenu',
                                'htmlOptions' => array('class' => 'userMenu'),
                                'encodeLabel' => false,
                                'items' => array(
                                    array('label' => '' . (!Yii::app()->user->isGuest) ? '<img src= ' . $imagesrc . '>' . substr($username, 0, 6) . '&nbsp;&nbsp;<em class="sprite"> </em>' : "", 'url' => '#', 'itemOptions' => array('class' => ''),
                                        'items' => array(
                                            array('label' => 'My Profile ', 'url' => array('/user/profile/mySkillhippo/')),
                                            array('label' => 'My Queries ', 'url' => array('/makeQuery/Myqueries/')),
                                            array('label' => 'My Inbox ', 'url' => array('/MailConversation/inbox/')),
                                            array('label' => 'My Classes ', 'url' => array('/classes/manageclasses/')),
                                            array('label' => 'My Courses ', 'url' => array('/courses/managecourse/')),
                                            array('label' => 'Learn Page ', 'url' => array('/users/learnuser')),
                                            array('label' => 'Logout', 'url' => array('/site/logout')),
                                        ), 'visible' => !Yii::app()->user->isGuest)
                                ),
                            ));
                            ?>
                            <!--End Of User Profile Drop Down--> 
                            <nav> 
                                <?php
                                $this->widget('zii.widgets.CMenu', array(
                                    'encodeLabel' => false,
                                    'items' => array(
                                        array('label' => 'CITY ', 'url' => '#', 'itemOptions' => array('class' => 'has-sub', 'tabindex' => "-1"),
                                        ),
                                        array('label' => 'LEARN ', 'url' => Yii::app()->cms->createUrl('learn'), 'itemOptions' => array('class' => 'has-sub', 'tabindex' => "-1"),
                                        ),
                                        array('label' => 'TEACH ', 'url' => array('/site/teach'), 'itemOptions' => array('class' => $lastClass)),
                                        array('label' => 'Login ', 'url' => array('/user/user/login',), 'itemOptions' => array('class' => 'last', 'onclick' => 'setSessionForTrainer("' . SkillConfig::WEB_USER . '");'), 'visible' => Yii::app()->user->isGuest),
                                    ),
                                ));
                                ?>              
                            </nav>                    
                        </div>
                    </div>
                </div>
            </div>
            <div class="clear"></div>
        </header>
